from selenium import webdriver
from selenium.webdriver.common.by import By
import time
d = webdriver.Chrome()
d.get("https://www.baidu.com")

# link = d.find_element(By.LINK_TEXT,'hao123')
link = d.find_element(By.PARTIAL_LINK_TEXT,'123')
link.click()

# search_ele = d.find_element(By.ID,'kw')
# search_ele = d.find_element(By.NAME,'wd')
# search_ele = d.find_element(By.CLASS_NAME,'s_ipt')
#
# search_ele.send_keys('你大爷')
# time.sleep(2)
# search_ele.clear()
# search_ele.send_keys('你二也')
#
# button = d.find_element(By.ID,'su')
# button.click()


time.sleep(5)
d.quit()